#!/usr/bin/python
import sys
import random
if len(sys.argv) != 2:
  print './gerador.py nodes'
  quit()

categorias = ["cat1", "cat2", "cat3", "cat4"]
nodes = int(sys.argv[1])
categorias_f = open('/tmp/cat.txt', 'w')
for i in range(nodes):
  categorias_f.write('%d %s\n' % (i, random.choice(categorias))) 
categorias_f.close()
arquivo = open('/tmp/graph.txt', 'w')
for i in range(nodes):
  for j in range(nodes):
    if i == j:
      continue
    if i < j:
      arquivo.write('%s %s %d\n' % (i, j, random.randint(0, 100)))
arquivo.close()
